<?php 
session_start();
if(!isset($_SESSION['id']))

{

	header("Location: index.php");

	exit();

} 

require("../db/opendb.php");
require("../config.php");



if(isset($_POST['submit']))
{
print_r($_POST);
}

?>

<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="../style.css">
<link rel="stylesheet" type="text/css" href="accounts/style.css">
<script type="text/javascript" src="../accounts/ajax_get_state.js"></script>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo SITE_KEY ?>"type="text/javascript"></script>
<script type="text/javascript">
	
	function submit_state()
	{
			var box = document.getElementById('state');
			var state = box.options[box.selectedIndex].value;
			get_city(state)
	}
	
	

function submitform()
{

hlat = document.getElementById('hlat').value;
hlng = document.getElementById('hlng').value;
state = document.getElementById('state').value;
city = document.getElementById('select_city_form').value;
category = document.getElementById('category').value;
tags = document.getElementById('tags').value;
url = document.getElementById('url').value;
location.href = "add_blog.php?url="+url+"&tags="+tags+"&category="+category+"&city="+city+"&state="+state+"&lat="+hlat+"&lng="+hlng
}

    </script>
	<style type="text/css">
    v\:* {
      behavior:url(#default#VML);
    }
    .style1 {font-size: 14px}
    </style>

	<form action="" method="post">
	<!--<form action="accounts/add_blog.php" method="post">-->
	<Div class="style11" style="padding:10px 0px 0px 5px; font-family:Verdana, Arial, Helvetica, sans-serif;">
	<strong>To add your website to our referral program, choose your state and city, you can them drag the marker to your desired location.</strong><BR>
	<BR />
       <div style=" padding:5px; float:left">Select your state
	 <select name=state id=state onChange="submit_state()">
							<option value="AL">AL</option>
							<option value="AK">AK</option>
							<option value="AZ">AZ</option>
							<option value="AR">AR</option>
							<option value="CA">CA</option>
							<option value="CO">CO</option>
							<option value="CT">CT</option>
							<option value="DE">DE</option>
							<option value="DC">DC</option>
							<option value="FL">FL</option>
							<option value="GA">GA</option>
							<option value="HI">HI</option>
							<option value="ID">ID</option>
							<option value="IL">IL</option>
							<option value="IN">IN</option>
							<option value="IA">IA</option>
							<option value="KS">KS</option>
							<option value="KY">KY</option>
							<option value="LA">LA</option>
							<option value="ME">ME</option>
							<option value="MD">MD</option>
							<option value="MA">MA</option>
							<option value="MI">MI</option>
							<option value="MN">MN</option>
							<option value="MS">MS</option>
							<option value="MO">MO</option>
							<option value="MT">MT</option>
							<option value="NE">NE</option>
							<option value="NV">NV</option>
							<option value="NH">NH</option>
							<option value="NJ">NJ</option>
							<option value="NM">NM</option>
							<option value="NY">NY</option>
							<option value="NC">NC</option>
							<option value="ND">ND</option>
							<option value="OH">OH</option>
							<option value="OK">OK</option>
							<option value="OR">OR</option>
							<option value="PA">PA</option>
							<option value="RI">RI</option>
							<option value="SC">SC</option>
							<option value="SD">SD</option>
							<option value="TN">TN</option>
							<option value="TX">TX</option>
							<option value="UT">UT</option>
							<option value="VT">VT</option>
							<option value="VA">VA</option>
							<option value="WA">WA</option>
							<option value="WV">WV</option>
							<option value="WI">WI</option>
							<option value="WY">WY</option>
		 </select>	
	  </div>
	  <div style=" padding:5px; float:left" id=city_select>Select City: <select disabled="disabled"></select></div>
	  
	 
    </DIV>
	<BR style="clear:left;">
	<div>
		<div id="map" style=" float:left; width: 500px; height: 300px; padding:20px; border:1px solid #006699;"><img src=http://realivent.com/images/map.jpg></div>
		<div style="float:left; padding-left:20px; width:200px" id="show_num">
		</div>
	</div>
	<div style="clear:left">
	<div style="width:500px; padding-bottom:20px; padding-top:10px;">
	<form action="add_blog.php" method="post" name="theform">
		
		<table width="540" id=form_container border="0" cellspacing="0" cellpadding="5">
			  <tr>
				<td id=form_header colspan="2">Your Information</td>
			  </tr>
		 	
			  <tr>
				<td align="right" nowrap="nowrap">Website URL:      </td>
				  <TD><input type="text" name="website" id='url' size=60>
			      </TD>
			  </tr>
			 
		 	 <tr>
			<td>&nbsp;</td>
				<TD><input name="submit" type="button" onclick="submitform()" value="Submit Blog"></TD>
		  </tr>
	  </table>
</form>

	</div>



<?php require("../db/closedb.php");?>